From: Chong Yidong Date: Sun, 25 Mar 2012 12:52:49 +0000 (+0800) Subject: Fix for custom-theme-write-faces. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~373 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=11b68299e6b971ef5df4dd06fd6f17a5dea5f90b;p=emacs.git Fix for custom-theme-write-faces. * lisp/cus-theme.el (custom-theme-write-faces): Retrieve current face spec with custom-face-get-current-spec if its :shown-value is not determined yet. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ee9e3d7c41..d908c917f89 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2012-03-25 Chong Yidong + * cus-theme.el (custom-theme-write-faces): Retrieve current face + spec with custom-face-get-current-spec if its :shown-value is not + determined yet (Bug#9337). + * button.el (button-at): Minor addition to docstring. 2012-03-24 Simon Leinen diff --git a/lisp/cus-theme.el b/lisp/cus-theme.el index 79799049378..ba2fa969fc4 100644 --- a/lisp/cus-theme.el +++ b/lisp/cus-theme.el @@ -437,14 +437,17 @@ It includes all faces in list FACES." (princ theme) (princ "\n") (dolist (spec faces) + ;; Insert the face iff the checkbox widget is checked. (when (widget-get (nth 1 spec) :value) (let* ((symbol (nth 0 spec)) (widget (nth 2 spec)) (value - (if (car-safe (widget-get widget :children)) - (custom-face-widget-to-spec widget) - ;; Child is null if the widget is closed (hidden). - (widget-get widget :shown-value)))) + (cond + ((car-safe (widget-get widget :children)) + (custom-face-widget-to-spec widget)) + ;; Child is null if the widget is closed (hidden). + ((widget-get widget :shown-value)) + (t (custom-face-get-current-spec symbol))))) (when (and (facep symbol) value) (princ (if (bolp) " '(" "\n '(")) (prin1 symbol)